# -*- cperl -*-
{
    my $expect = <<"____EXPECT";
1..8
ok, target:t/foo.t.t.a, stem:foo.t.t
ok, target:t/a.foo.t.t.t, stem:foo.t.t
ok, target:t/\%.a, stem:\%
ok, target:foo.a, stem:a
ok, target:foo.b, stem:b
ok, target:a.bar, stem:a
ok, target:b.bar, stem:b
ok, target:foo, prerequsites:t/\%.a foo.a foo.b a.bar b.bar, stem:
\%, target:all, stem:all
____EXPECT
    ;
    my @r;
    do { push @r, $_ if !m/^smart:.+$/ } for @result;
    my $result = join '', @r;
    $check_result = $result eq $expect;
    $_ = "$file.log";
    unlink if -f;
    do {
        open F, ">$file.log" or die "$!";
        print F "==================== expecting ==\n";
        print F $expect;
        print F "\n";
        print F "==================== received ===\n";
        print F $result;
        close F;
    } unless $check_result;
    print "";
}
